module.exports = {
  // 别名设置
  configureWebpack: {
    resolve: {
      alias: {
        "components": "@/components",
        "assets": "@/assets",
        "network": "@/network",
        "utils": "@/utils",
        "pages": "@/pages"
      }
    }
  },
  // 配置代理服务器
  devServer: {
    // host: '192.168.2.8',
    host: 'localhost',
    port: 8080,
    proxy: {
      "/api": {
        target: 'http://www.520gongfu.com:9527/api',
        changeOrigin: true,
        pathRewrite: {
          "^/api": ""
        }
      },
      '/QQ': {
        target: 'https://graph.qq.com/oauth2.0',
        changeOrigin: true,
        pathRewrite: {
          "^/QQ": ""
        }
      }
    }
  },
}